package com.gakj.truck.third.core.enums;

/**
 * 用户注册来源
 * Created by gc on 2016/6/30.
 */
public enum EnumUserResource {

    WNIOS("1","蜗牛IOS"),WNANDRIOD("2","蜗牛andriod"),WNADMIN("3","蜗牛后台"),WNCHAT("4","蜗牛微信"),ZQCHAT("5","重汽微信"),OUMANCHAT("6","欧曼微信"),INTEGRALPAGE("7","积分页面"),
    OUMANANDRIOD("8", "欧曼andriod"), OUMANIOS("9", "欧曼IOS"), OUMANSHARE("10", "欧曼共享用户"), OUMANAPP("11", "欧曼APP用户"),HUATONG("12","华通用户");


    private String code;
    private String name;

    private EnumUserResource(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static EnumUserResource getEnum(String value) {
        for (EnumUserResource e : EnumUserResource.values()) {
            if (value.equals(e.getCode())) {
                return e;
            }
        }
        return null;
    }
}